'use strict';
const WXBizDataCrypt = require('wxbizdatacrypt');
exports.main = async (event, context) => {
	function decrypt(data, AES_KEY, IV) {
		const key = CryptoJS.enc.Utf8.parse(AES_KEY);
		const iv = CryptoJS.enc.Utf8.parse(IV);
		const decrypt = CryptoJS.AES.decrypt(data, key, {
			iv,
			mode: CryptoJS.mode.CBC,
			padding: CryptoJS.pad.Pkcs7,
		}).toString(CryptoJS.enc.Utf8);
		return decrypt;
	},
	
	console.log(decrypt , 'decrypt---------');

	//返回数据给客户端
	return event
};